package com.zhijiaoyun.dao;

import com.zhijiaoyun.dao.core.IBaseDao;
import com.zhijiaoyun.model.CourseRecommend;
import com.zhijiaoyun.model.dto.CourseRecommendDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface ICourseRecommendDao extends IBaseDao<CourseRecommend> {

    /**
     * get by courseId
     *
     * @param courseId
     * @return
     */
    CourseRecommend selectByCourseId(Long courseId);

    /**
     * list dtos by params
     *
     * @return
     */
    List<CourseRecommendDto> selectByParamsDto();

    /**
     * list all
     *
     * @return
     */
    List<CourseRecommend> selectAll();

    /**
     * count by params
     *
     * @return
     */
    int countByParams();

    /**
     * page by prarms
     *
     * @param beginIndex
     * @param pageSize
     * @return
     */
    List<CourseRecommend> pageByParams(@Param("beginIndex") int beginIndex, @Param("pageSize") int pageSize);

    /**
     * delete by courseId
     *
     * @param courseId
     */
    void deleteByCourseId(Long courseId);
}